<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加角色</title>
</head>
<body>

<form class="layui-form" lay-filter="layui-form">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <text title="必填项" style="color:red;">*</text>
                        名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入名称"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <text style="color:red;">*</text>
                        分类</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="category"
                             data-sourceType="data"
                             data-radio="true"
                             data-source="[{name:'方块',value:'方块'},{name:'食物',value:'食物'},{name:'工具',value:'工具'},{name:'魔咒',value:'魔咒'},{name:'状态',value:'状态'},{name:'生物',value:'生物'}]"
                             data-layVerify="required"
                             data-onchange="changeType"
                        ></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <text style="color:red;">*</text>
                        二级分类</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="sub_category"
                             data-sourceType="data"
                             data-radio="true"
                             data-source="[{name:'建筑方块',value:'建筑方块'},{name:'装饰性方块',value:'装饰性方块'},{name:'红石',value:'红石'},{name:'食物',value:'食物'},{name:'工具',value:'工具'},{name:'战斗用品',value:'战斗用品'},{name:'一级',value:'一级'},{name:'二级',value:'二级'},{name:'三级',value:'三级'},{name:'四级',value:'四级'},{name:'五级',value:'五级'},{name:'减益',value:'减益'},{name:'增益',value:'增益'},{name:'特殊',value:'特殊'},{name:'友好生物',value:'友好生物'},{name:'敌对生物',value:'敌对生物'}]"
                             data-layVerify="required"
                        ></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        图示</label>
                    <div class="layui-input-block">
                        <div class="laytpUpload"
                             data-layVerify="required"
                             data-name="img"
                             data-accept="image"
                             data-width="400"
                             data-type="ali-oss"
                             data-showChoiceBtn="false"
                        ></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        大图</label>
                    <div class="layui-input-block">
                        <div class="laytpUpload"
                             data-layVerify="required"
                             data-name="big_img"
                             data-accept="image"
                             data-width="1000"
                             data-height="1400"
                             data-type="ali-oss"
                             data-showChoiceBtn="false"
                        ></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <text title="必填项" style="color:red;">*</text>
                        描述</label>
                    <div class="layui-input-block">
                        <input type="text" name="description" lay-verify="required" autocomplete="off"
                               placeholder="请输入描述"
                               class="layui-input">
                    </div>
                </div>
                <blockquote class="layui-elem-quote">基础属性</blockquote>
                <div class="layui-form-item" id="type1">
                    <div class="layui-inline" >
                        <label class="layui-form-label two-part-label">亮度</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <input type="text" name="type1_light" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input fangkuai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">爆炸</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <input type="text" name="type1_blast" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input fangkuai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">工具</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <input type="text" name="type1_revive" autocomplete="off"
                                   placeholder="请填入是或否" class="layui-input fangkuai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">堆叠属性</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <input type="text" name="type1_stack" autocomplete="off"
                                   placeholder="请填入是(64)或否(64)" class="layui-input fangkuai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">硬度</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <input type="text" name="type1_hardness" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input fangkuai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">交易</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <input type="text" name="is_deal" autocomplete="off"
                                   placeholder="请输入是或否" class="layui-input fangkuai-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" id="type2" style="display: none">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">回复属性</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type2_back" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input shiwu-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">是否再生</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type2_revive" autocomplete="off"
                                   placeholder="请输入是或否" class="layui-input shiwu-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">是否堆叠</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type2_stack" autocomplete="off"
                                   placeholder="请输入是(64)或否(64)" class="layui-input shiwu-input">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" id="type3" style="display: none">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">耐久/稀有度</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type3_durable" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 gongju-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">恢复</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type3_revive" autocomplete="off"
                                   placeholder="请输入是或否" class="layui-input point1 gongju-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">堆叠</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type3_stack" autocomplete="off"
                                   placeholder="请输入是(64)或否(64)" class="layui-input point1 gongju-input">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" id="type4" style="display: none">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">最大等级</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type4_maxLevel" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 mozhou-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">id</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type4_id" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 mozhou-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">重量</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type4_weight" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 mozhou-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" id="type5" style="display: none">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">类别</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type5_category" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 zhuangtai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">标签</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type5_type" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 zhuangtai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">颜色</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type5_point" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 zhuangtai-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">等级</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type5_level" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 zhuangtai-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" id="type6" style="display: none">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">生命</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type6_life" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 shengwu-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">防御</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type6_defense" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 shengwu-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">经验</label>
                        <div class="layui-input-inline">
                            <input type="text" name="type6_experience" autocomplete="off"
                                   placeholder="请输入数值" class="layui-input point1 shengwu-input">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" id="type13" style="display: none">
                    <blockquote class="layui-elem-quote">开采工具</blockquote>
                    <div class="layui-inline">
                        <div class="layui-input-block" style="width: 500px;">
                            <div class="xmSelect"
                                 data-name="tool_name"
                                 data-sourceType="route"
                                 data-source="/admin.myworld.good/worldImg"
                                 data-radio="true"
                                 data-textField="name"
                                 data-valueField="name"
                            ></div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" id="type14" style="display: none">
                    <blockquote class="layui-elem-quote">用途</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="20%">
                            <col width="80%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>描述</th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input fangkuai-input" type="text" name="use_title[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input fangkuai-input" type="text" name="use_content[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div class="layui-form-item" id="type15" style="display: none">
                    <blockquote class="layui-elem-quote">获取方式</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="20%">
                            <col width="80%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>描述</th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input fangkuai-input" type="text" name="get_way_title[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input fangkuai-input" type="text" name="get_way_content1[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="layui-form-item" id="type16" style="display: none">
                    <blockquote class="layui-elem-quote">获取方式</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="90%">
                            <col width="10%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>描述</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="get_way_content2[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">关联物品</blockquote>
                <div class="layui-form-item">
                    <div class="layui-inline">
                            <div class="layui-input-block" style="width: 500px;">
                                <div class="xmSelect"
                                     data-name="make_goods"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="false"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                    </div>
                </div>
                <blockquote class="layui-elem-quote">相容物品</blockquote>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 500px;">
                                <div class="xmSelect"
                                     data-name="fuse_goods"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="false"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>

                <div class="layui-form-item">
                    <blockquote class="layui-elem-quote">合成方式</blockquote>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料1</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position1"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料2</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position2"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料3</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position3"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料4</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position4"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料5</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position5"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料6</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position6"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料7</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position7"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料8</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position8"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">材料9</label>
                        <td style="padding: 4px 15px;">
                            <div class="layui-input-block" style="width: 200px;">
                                <div class="xmSelect"
                                     data-name="formula_position9"
                                     data-sourceType="route"
                                     data-source="/admin.myworld.good/worldImg"
                                     data-radio="true"
                                     data-textField="name"
                                     data-valueField="name"
                                ></div>
                            </div>
                        </td>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">合成方式</label>
                        <div class="layui-input-inline">
                            <input type="text" name="formula_type" autocomplete="off"
                                   placeholder="请输入材料" class="layui-input fangkuai-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">数量</label>
                        <div class="layui-input-inline">
                            <input type="text" name="formula_num" autocomplete="off"
                                   placeholder="请输入材料" class="layui-input fangkuai-input">
                        </div>
                    </div>
                </div>


                <div class="layui-form-item" id="type7" style="display: none">
                    <blockquote class="layui-elem-quote">效果</blockquote>
                    <div class="layui-inline">
                        <label class="layui-form-label two-part-label">效果</label>
                        <div class="layui-input-inline">
                            <input type="text" name="effect" autocomplete="off"
                                   placeholder="请输入效果" class="layui-input point1">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" id="type8" style="display: none">
                    <blockquote class="layui-elem-quote">效果</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="20%">
                            <col width="80%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>效果</th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="effect_title[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="effect_content[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>


                <div class="layui-form-item" id="type9" style="display: none">
                    <blockquote class="layui-elem-quote">大小</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="20%">
                            <col width="80%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>大小</th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="size_title[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="size_content[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div class="layui-form-item" id="type10" style="display: none">
                    <blockquote class="layui-elem-quote">装备</blockquote>
                        <div class="layui-inline">
                            <td style="padding: 4px 15px;">
                                <div class="layui-input-block" style="width: 500px;">
                                    <div class="xmSelect"
                                         data-name="equipment"
                                         data-sourceType="route"
                                         data-source="/admin.myworld.good/worldImg"
                                         data-radio="false"
                                         data-textField="name"
                                         data-valueField="name"
                                    ></div>
                                </div>
                            </td>
                        </div>
                </div>

                <div class="layui-form-item" id="type11" style="display: none">
                    <blockquote class="layui-elem-quote">行为</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="20%">
                            <col width="80%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>行为</th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="behavior_title[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="behavior_content[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div class="layui-form-item" id="type12" style="display: none">
                    <blockquote class="layui-elem-quote">掉落</blockquote>
                    <table class="layui-table" style="margin: 0;" lay-skin="line">
                        <colgroup>
                            <col width="90%">
                            <col width="10%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>掉落</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody class="tableDnd">
                        <tr>
                            <td style="padding: 4px 15px;">
                                <input class="layui-input" type="text" name="drop[]" value=""/>
                            </td>
                            <td style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-delete delArrayItem"
                                   layer-tips="删除" title="删除"></a>
                            </td>
                        </tr>
                        <tr class='nodrop nodrag'>
                            <td colspan="4" style="padding: 4px 15px;">
                                <a href="javascript:void(0);"
                                   class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-add-1 addArrayItem"
                                   title="追加">追加</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
    </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="submit" class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="add">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="laytp-btn laytp-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
    if (localStorage.getItem("staticDomain")) {
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/jquery_3.3.1.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/jquery.tablednd.js?v=" + localStorage.getItem("version") + "'><\/script>");
    } else {
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='/static/component/jquery_3.3.1.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='/static/component/jquery.tablednd.js?v=" + localStorage.getItem("version") + "'><\/script>");
    }
</script>
<script>
    window.changeType = function (params) {
        if (params.change[0]['value'] == '方块') {
            $('#type1 .fangkuai-input').attr('lay-verify','required');
            $('#type2 .shiwu-input').removeAttr('lay-verify');
            $('#type3 .gongju-input').removeAttr('lay-verify');
            $('#type4 .mozhou-input').removeAttr('lay-verify');
            $('#type5 .zhuangtai-input').removeAttr('lay-verify');
            $('#type6 .shengwu-input').removeAttr('lay-verify');
            $('#type1').css('display', 'block');
            $('#type2').css('display', 'none');
            $('#type3').css('display', 'none');
            $('#type4').css('display', 'none');
            $('#type5').css('display', 'none');
            $('#type6').css('display', 'none');
            $('#type7').css('display', 'none');
            $('#type8').css('display', 'none');
            $('#type9').css('display', 'none');
            $('#type10').css('display', 'none');
            $('#type11').css('display', 'none');
            $('#type12').css('display', 'none');
            $('#type13').css('display', 'block');
            $('#type14').css('display', 'block');
            $('#type15').css('display', 'block');
            $('#type16').css('display', 'none');
        }
        if (params.change[0]['value'] == '食物') {
            $('#type2 .shiwu-input').attr('lay-verify','required');
            $('#type1 .fangkuai-input').removeAttr('lay-verify');
            $('#type3 .gongju-input').removeAttr('lay-verify');
            $('#type4 .mozhou-input').removeAttr('lay-verify');
            $('#type5 .zhuangtai-input').removeAttr('lay-verify');
            $('#type6 .shengwu-input').removeAttr('lay-verify');
            $('#type1').css('display', 'none');
            $('#type2').css('display', 'block');
            $('#type3').css('display', 'none');
            $('#type4').css('display', 'none');
            $('#type5').css('display', 'none');
            $('#type6').css('display', 'none');
            $('#type7').css('display', 'none');
            $('#type8').css('display', 'none');
            $('#type9').css('display', 'none');
            $('#type10').css('display', 'none');
            $('#type11').css('display', 'none');
            $('#type12').css('display', 'none');
            $('#type13').css('display', 'none');
            $('#type14').css('display', 'block');
            $('#type15').css('display', 'block');
            $('#type16').css('display', 'none');
        }
        if (params.change[0]['value'] == '工具') {
            $('#type1 .fangkuai-input').removeAttr('lay-verify');
            $('#type2 .shiwu-input').removeAttr('lay-verify');
            $('#type3 .gongju-input').attr('lay-verify','required');
            $('#type4 .mozhou-input').removeAttr('lay-verify');
            $('#type5 .zhuangtai-input').removeAttr('lay-verify');
            $('#type6 .shengwu-input').removeAttr('lay-verify');
            $('#type1').css('display', 'none');
            $('#type2').css('display', 'none');
            $('#type3').css('display', 'block');
            $('#type4').css('display', 'none');
            $('#type5').css('display', 'none');
            $('#type6').css('display', 'none');
            $('#type7').css('display', 'none');
            $('#type8').css('display', 'none');
            $('#type9').css('display', 'none');
            $('#type10').css('display', 'none');
            $('#type11').css('display', 'none');
            $('#type12').css('display', 'none');
            $('#type13').css('display', 'none');
            $('#type14').css('display', 'block');
            $('#type15').css('display', 'block');
            $('#type16').css('display', 'none');
        }
        if (params.change[0]['value'] == '魔咒') {
            $('#type1 .fangkuai-input').removeAttr('lay-verify');
            $('#type2 .shiwu-input').removeAttr('lay-verify');
            $('#type3 .gongju-input').removeAttr('lay-verify');
            $('#type4 .mozhou-input').attr('lay-verify','required');
            $('#type5 .zhuangtai-input').removeAttr('lay-verify');
            $('#type6 .shengwu-input').removeAttr('lay-verify');
            $('#type1').css('display', 'none');
            $('#type2').css('display', 'none');
            $('#type3').css('display', 'none');
            $('#type4').css('display', 'block');
            $('#type5').css('display', 'none');
            $('#type6').css('display', 'none');
            $('#type7').css('display', 'block');
            $('#type8').css('display', 'none');
            $('#type9').css('display', 'none');
            $('#type10').css('display', 'none');
            $('#type11').css('display', 'none');
            $('#type12').css('display', 'none');
            $('#type13').css('display', 'none');
            $('#type14').css('display', 'none');
            $('#type15').css('display', 'none');
            $('#type16').css('display', 'none');
        }
        if (params.change[0]['value'] == '状态') {
            $('#type1 .fangkuai-input').removeAttr('lay-verify');
            $('#type2 .shiwu-input').removeAttr('lay-verify');
            $('#type3 .gongju-input').removeAttr('lay-verify');
            $('#type4 .mozhou-input').removeAttr('lay-verify');
            $('#type5 .zhuangtai-input').attr('lay-verify','required');
            $('#type6 .shengwu-input').removeAttr('lay-verify');
            $('#type1').css('display', 'none');
            $('#type2').css('display', 'none');
            $('#type3').css('display', 'none');
            $('#type4').css('display', 'none');
            $('#type5').css('display', 'block');
            $('#type6').css('display', 'none');
            $('#type7').css('display', 'block');
            $('#type8').css('display', 'none');
            $('#type9').css('display', 'none');
            $('#type10').css('display', 'none');
            $('#type11').css('display', 'none');
            $('#type12').css('display', 'none');
            $('#type13').css('display', 'none');
            $('#type14').css('display', 'none');
            $('#type15').css('display', 'none');
            $('#type16').css('display', 'block');
        }
        if (params.change[0]['value'] == '生物') {
            $('#type1 .fangkuai-input').removeAttr('lay-verify');
            $('#type2 .shiwu-input').removeAttr('lay-verify');
            $('#type3 .gongju-input').removeAttr('lay-verify');
            $('#type4 .mozhou-input').removeAttr('lay-verify');
            $('#type5 .zhuangtai-input').removeAttr('lay-verify');
            $('#type6 .shengwu-input').attr('lay-verify','required');
            $('#type1').css('display', 'none');
            $('#type2').css('display', 'none');
            $('#type3').css('display', 'none');
            $('#type4').css('display', 'none');
            $('#type5').css('display', 'none');
            $('#type6').css('display', 'block');
            $('#type7').css('display', 'none');
            $('#type8').css('display', 'block');
            $('#type9').css('display', 'block');
            $('#type10').css('display', 'block');
            $('#type11').css('display', 'block');
            $('#type12').css('display', 'block');
            $('#type13').css('display', 'none');
            $('#type14').css('display', 'none');
            $('#type15').css('display', 'block');
            $('#type16').css('display', 'none');
        }
    }
</script>
<script>
    layui.use(['laytp'], function () {
        layui.form.on('submit(add)', function (data) {
            var btnAnim = layui.button.load({elem: $(this)});
            facade.ajax({
                route: '/admin.myworld.good/add',
                data: data.field
            }).done(function (res) {
                if (res.code === 0) {
                    parent.layui.layer.close(parent.layui.layer.getFrameIndex(window.name));//关闭当前页
                    parent.layui.table.reload("laytp-table");
                }
                btnAnim.stop();
            }).fail(function () {
                btnAnim.stop();
            });
            return false;
        });
    })
</script>
</body>
</html>